package com.example.a_java.controller;

import com.example.a_java.dto.SummaryDTO;
import com.example.a_java.service.StatisticsService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/statistics")
public class StatisticsController {
    
    private final StatisticsService statisticsService;

    public StatisticsController(StatisticsService statisticsService) {
        this.statisticsService = statisticsService;
    }

    @GetMapping("/summary")
    public SummaryDTO getSummary() {
        return statisticsService.getSummaryStatistics();
    }
}